import apiService from './request';

export default {
  AIPPT_Slides(
    category: string,
  ): Promise<any> {
    const data = {
      category,
    }
    return apiService.post('office/aippt_slides', data);
  },
  AIPPT_Outline(
    content: string,
    language: string,
    model: string,
  ): Promise<any> {
    const data = {
      content,
      language,
      model,
      stream: true,
    }
    return apiService.postStream('office/aippt_outline', data);
  },
  AiPPT_Template: async (
    id: string
  ): Promise<any> => {
    const data = {
      id,
    };
    // 使用自定义 header 进行 POST 请求
    return apiService.post('office/aippt_tpl', data);
  },
  AIPPT_Templates: async (
    category: string
  ): Promise<any> => {
    const data = {
      category,
    };
    // 使用自定义 header 进行 POST 请求
    return apiService.post('office/aippt_tpl', data);
  },
  AIPPT(
    content: string,
    language: string,
    model: string,
  ): Promise<any> {
    const data = {
      content,
      language,
      model,
      stream: true,
    }
    return apiService.postStream('office/aippt', data);
    
  },
};